package cn.edu.flink.tutorial.watermark;

import org.apache.flink.streaming.api.functions.AssignerWithPunctuatedWatermarks;
import org.apache.flink.streaming.api.functions.timestamps.BoundedOutOfOrdernessTimestampExtractor;
import org.apache.flink.streaming.api.watermark.Watermark;
import org.apache.flink.streaming.api.windowing.time.Time;

import javax.annotation.Nullable;
import java.time.Duration;

public class test {
    public static void main(String[] args) {
        new BoundedOutOfOrdernessTimestampExtractor<String>(Time.seconds(10)) {
            @Override
            public long extractTimestamp(String s) {
                return 0;
            }
        };

        new AssignerWithPunctuatedWatermarks<String>() {
            @Override
            public long extractTimestamp(String s, long l) {
                return 0;
            }

            @Nullable
            @Override
            public Watermark checkAndGetNextWatermark(String s, long l) {
                return null;
            }
        };
    }
}
